package GUI.TabPanel;

import javax.swing.*;

public class TabPanel extends JPanel {

	private static final long serialVersionUID = 1L;
	private JTabbedPane MainPane = new JTabbedPane();
	private Generals Generals = new Generals();
	private DataBase DataBases = new DataBase();
	private DataView DataView = new DataView();
	private Advance advance = new Advance();
	
	public TabPanel() {
		MainPane.addTab("Generals", Generals);
		MainPane.addTab("DataBases", DataBases);
		MainPane.addTab("DataView", DataView);
		MainPane.addTab("Advance", advance);
		
		GroupLayout MainLayout = new GroupLayout(this);
		this.setLayout(MainLayout);
        MainLayout.setHorizontalGroup(
            MainLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(MainPane, javax.swing.GroupLayout.DEFAULT_SIZE, 337, Short.MAX_VALUE)
        );
        MainLayout.setVerticalGroup(
            MainLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(MainPane)
        );
	}
	
	public void Refresh(Object SelectObject) {
		this.Generals.Refresh(SelectObject);
		this.DataBases.Refresh(SelectObject);
		this.DataView.reFresh(SelectObject);
		this.advance.Refresh(SelectObject);
	}
}
